package com.example.mapper;

import com.example.entity.Address;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface AddressMapper {
    @Select("select *from address")
    List<Address> selectAll();

    List<Address> selectByUser(Integer userId);

    void addAddress(Address address);

    @Delete("delete from address where address_id=#{id}")
    void deleteAddressById(Integer id);
}
